package com.future.lock.find.bean;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import org.json.JSONObject;

/**
 * Created by jniu on 2017/11/20.
 */

public class FindListBean implements MultiItemEntity {

    public static final int TYPE_IMG = 0;
    public static final int TYPE_VIDEO = 1;

    public String id;
    public String imgUrl;
    public String title;
    public String time;
    public String commentCount;
    public int type; //资讯类型 0图文资讯 1视频资讯

    @Override
    public int getItemType() {
        return type;
    }

    public void parse(JSONObject object){
        id = object.optString("info_id");
        imgUrl = object.optString("img_url");
        title = object.optString("title");
        time = object.optString("info_date");
        commentCount = object.optString("comment_count");
        type = object.optInt("type");
    }
}
